<?php

namespace Modules\Buy\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ArrtRequest extends FormRequest
{

    //验证规则
    public function rules()
    {
        $id = $this->route('arr');
//        dd($id);
        return array (
            'name'=>'required|max:20|unique:arrs,name,'.$id
);
    }

    //错误信息处理
    public function messages()
    {
        return array (

);
    }

    //权限验证
    public function authorize()
    {
        return true;
    }
}
